﻿using An_Im.Theme.Custom;
using An_Im.UI;
using Microsoft.Office.Tools;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;

namespace An_Im
{
    // 弹出框的管理类。
    internal static class PopupWindowManager
    {
        // 动画重命名窗体。
        public static AnWindow AnimationRenameWindow { get; private set; }
        public static AnWindow KeyPointFrameEditorWindow { get; private set; }

        public static void Initialize()
        {
            AnimationRenameWindow = AnWindow.CreateWindow(new AnImAnimRenameControl());
            var uripath2 = @"An_Im;component/UI/ResourceDictionary/AnimationRenameResourceDictionary.xaml";
            var animationRenameResourceDictionary = new ResourceDictionary();
            animationRenameResourceDictionary.Source = new Uri(uripath2, UriKind.Relative);
            var animationRenameMiniContent = animationRenameResourceDictionary["AnIm.AnimationRenameResourceDictionary"] as ControlTemplate;
            AnimationRenameWindow.TitleContent = animationRenameMiniContent;

            AnimationRenameWindow.ResizeMode = ResizeMode.NoResize;


            KeyPointFrameEditorWindow = AnWindow.CreateWindow(new Expression.KeyPointFrameEditorControl());
            var uripath = @"An_Im;component/Expression/KeyPointFrameEditorResourceDictionary.xaml";
            var KeyPointFrameEditorResourceDictionary = new ResourceDictionary();
            KeyPointFrameEditorResourceDictionary.Source = new Uri(uripath,UriKind.Relative);
            var keyPointFrameEditorMiniContent = KeyPointFrameEditorResourceDictionary["AnIm.KeyPointFrameEditorControlTemplate"] as ControlTemplate;
            KeyPointFrameEditorWindow.TitleContent = keyPointFrameEditorMiniContent;

            KeyPointFrameEditorWindow.ResizeMode = ResizeMode.NoResize;


        }
    }
}
